<include file="public@header" />
<script type="text/html" id="photos-item-tpl">
	<li id="saved-image{id}">
		<input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">
		<input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"
			   style="width: 200px;" title="图片名称">
		<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"
			 onclick="imagePreviewDialog(this.src);">
		<a href="javascript:uploadOneImage('图片上传','#photo-{id}','{$tomb_num}');">替换</a>
		<a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>
	</li>
</script>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('Service/depositindex')}">寄存管理</a></li>
			<li class="active"><a href="">任务完成</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form" action="{:url('Service/depositfinish')}" method="post" enctype="multipart/form-data">
            <fieldset>
				<div class="control-group">
					<label class="control-label"><span class="form-required">*</span>反馈图片</label>
					<div class="controls">
						<ul id="photos" class="pic-list list-unstyled form-inline">
							<notempty name="$photourls">
								<foreach name="photourls" item="vo">
									<php>$img_url=cmf_get_image_preview_url($vo['url']);</php>
									<li id="saved-image{$key}">
										<input id="photo-{$key}" type="hidden" name="photo_urls[]"
											   value="{$vo.url}">
										<input class="form-control" id="photo-{$key}-name" type="text"
											   name="photo_names[]"
											   value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">
										<img id="photo-{$key}-preview"
											 src="{:cmf_get_image_preview_url($vo['url'])}"
											 style="height:36px;width: 36px;"
											 onclick="parent.imagePreviewDialog(this.src);">
										<a href="javascript:uploadOneImage('图片上传','#photo-{$key}','{$tomb_num}');">替换</a>
										<a href="javascript:(function(){$('#saved-image{$key}').remove();})();">移除</a>
									</li>
								</foreach>
							</notempty>
						</ul>
						<input type="hidden" name="photo_urls[]" value="">
						<input type="hidden" name="photo_names[]" value="">
						<a class="btn btn-primary" href="javascript:uploadMultiImage('图片上传','#photos','photos-item-tpl','{$tomb_num}');">选择图片</a>
					</div>
				</div>
				<input type="hidden" name="service_id" value="{$service_id}">
				<input type="hidden" name="task_type" value="{$TaskType}">
				<input type="hidden" name="type" value="{$type}">
                <div class="control-group1 normal">
					<label class="control-label"><span class="form-required">*</span>任务备注</label>
					<div class="controls">
						<textarea class="form-control" rows="4" cols="40" name="confirm_content" required>{$confirm_content}</textarea>
					</div>
				</div>

			</fieldset>
			<div class="form-actions">
				<if ($service_status)!=3>
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</if>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
	<script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>

</body>
</html>